package moneda;

import java.util.Scanner;

public class Monedas {

	public static void main(String[] args) {
	
		Scanner entero = new Scanner(System.in);
		
		int A=0;
		int E=0;
		int M=0;
		
		do{ 
			try{
			System.out.println("Ingrese la cantidad de juegos:");
			int N = entero.nextInt();
			M=N;
			for(int i=0;i<M;i++){
				int R = entero.nextInt();
				if(R>0){E++;}else{A++;}
			
			}}catch(Exception e){
				System.out.println("Ingrese solo numeros");
			}
		}while(M!=0);
		entero.close();
		System.out.println("Mary won "+A+" times and John won "+E);
	

}}
